﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<LibraryMusicStore.Album>" %>

<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script> 
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script> 
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script> 

    <%--<% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>--%>
            
            
            <%--<div class="editor-field">
                
                <%= Html.ValidationMessageFor(model => model.AlbumId) %>
            </div>--%>
             
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Title) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Title)%>
                <%= Html.ValidationMessageFor(model => model.Title) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Price) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Price, String.Format("{0:F}", Model.Price)) %>
                <%= Html.ValidationMessageFor(model => model.Price) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.AlbumArtUrl) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.AlbumArtUrl) %>
                <%= Html.ValidationMessageFor(model => model.AlbumArtUrl) %>
            </div>
            
            <div class="editor-label">
                <%=Html.LabelFor(model=>model.Artist) %>
            </div>
            <div class="dropdown-field">
                 <%= Html.DropDownList("ArtistId", new SelectList(ViewData["Artists"] as IEnumerable,
                                         "ArtistId", "Name", Model.ArtistId))%>
            </div>
            
            <div class="editor-label">
                <%=Html.LabelFor(model=>model.Genre) %>
            </div>
            <div class="dropdown-field">
                 <%= Html.DropDownList("GenreId", new SelectList(ViewData["Genres"] as IEnumerable,
                                         "GenreID", "Name", Model.GenreId))%>
            </div>

            
            <%--<p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>--%>


